Skip to content

bugfix: symbol_factoryt must preserve struct_tag types [blocks: #3652] #3647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2019

Conversation

kroening
Copy link
Member

The struct_tag type is currently expanded into the corresponding struct
type; this yields an invalid assignment instruction where the type of lhs()
and rhs() differs.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

The struct_tag type is currently expanded into the corresponding struct
type; this yields an invalid assignment instruction where the type of lhs()
and rhs() differs.
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: b552cc1).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/95950695

Copy link
Contributor

@danpoe danpoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danpoe danpoe removed their assignment Dec 31, 2018
Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoting part of the commit message: "this yields an invalid assignment instruction where the type of lhs() and rhs() differs."

Why did we not notice that that's invalid, and could we have a regression test that failed before and is fixed via this change? My suspicion, however, is that what was generated will only become "invalid" via some future change (the symex type renaming story). So we either need

  1. a regression test or
  2. an accurate commit message.

A lot of effort is going into validation of goto programs and I'm finding it hard to approve of "bug fixes" of this sort that come without any tests or additional goto-program validation steps. For any bug that we fix we better make sure it cannot come up again. And if isn't a bug just yet, then we shouldn't say so.

@kroening
Copy link
Member Author

The problem is that the Java object factory has the same issue; that needs to be fixed before the goto-program validation check can be enabled.

@tautschnig tautschnig changed the title bugfix: symbol_factoryt must preserve struct_tag types bugfix: symbol_factoryt must preserve struct_tag types [blocks: #3652] Jan 10, 2019
@tautschnig tautschnig dismissed their stale review January 10, 2019 18:14

My concerns have been resolved via #3660

@tautschnig tautschnig merged commit dbc301f into develop Jan 10, 2019
@tautschnig tautschnig deleted the symbol_factoryt_fix branch January 10, 2019 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants